/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package basiclanguage;

/**
 *
 * @author Nguyen Minh Tan
 */
public class ThamChieuThamTriHai {
    public class ClassTest{
        public ClassTest(String test) {
            this.test = test;
        }
        public String test;
    }
    public ThamChieuThamTriHai() {
        ClassTest test1 = new ClassTest("Lop mot");
        ClassTest test2 = new ClassTest("Lop hai");
        //Truoc khi truyen` vao` ham
        System.out.print(test1.test+"\n");
        //Trong ham` se~ in ra
        functiontest(test1, test2);
        //Sau khi ra khoi? ham`
        System.out.print(test1.test+"\n");
    }
    //
    public void functiontest(ClassTest test1,ClassTest test2){
        test1 = test2;
        System.out.print(test1.test+"\n");
    }

    public static void main(String[] args){
        new ThamChieuThamTriHai();
    }
}
/*
Lop mot
Lop hai
Lop mot
 * */